import React, { useState } from 'react'
import style from "./enterprise.module.css";
import Enterprisetop from "./enterpriseTop";
import Enquirenow from "./EnquireNow/Enquirenow.tsx";
import EasingAnimation from "./EasingAnimation/EasingAnimation.tsx";
import Carousel from "./Carousel/Carouselimg.tsx";
import Textcarousel from "./TextCarousel/Textcarousel.tsx";
import Marquee from "./Marquee/Marqueeone.tsx";
function Index() {

    // const [bool, setBool] = useState(true)

    // function unmuteVideo() {
    //     console.log(11111);

    //     setBool(false) // 移除静音
    // }

    //弹框
    const [isModalOpen, setIsModalOpen] = useState(false);

    const showModal = () => {
        setIsModalOpen(true);
    };

    const iscancel = () => {
        setIsModalOpen(false);
    };
    ;
    return (
        <div className={style.enterprisebox}>
            {/* 顶部 */}
            <Enterprisetop></Enterprisetop>
            {/* 中间背景动画 */}
            <div className={style.mainvideo} id='myVideo'>
                <video src="https://cdn.dancf.com/fe-assets/20231204/ac0f2eb25a81c4ec41964ed319a08eb7.webm"
                    // muted={bool}
                    muted
                    autoPlay
                    loop
                    style={{ width: '100%', height: '100%' }}
                ></video>
                <div className={style.consultation}>
                    <h2>视觉内容创新方案<br></br>驱动企业营销增长</h2>
                    <div className={style.number}>
                        全链路数字化内容中台，助力企业营销降本增效，为数字化时代<br />
                        快速迭代的内容营销持续赋能
                    </div>
                    <button className={style.Enquirenow} onClick={showModal}>立即咨询</button>
                    {/* 弹框 */}
                    <Enquirenow isModalOpen={isModalOpen} iscancel={iscancel}></Enquirenow>
                </div>
            </div>
            {/* <button onClick={unmuteVideo}>启动声音</button> */}
            {/* 中下黑色背景 */}
            <div className={style.back}>
                <p className={style.title}>
                    从创作到应用
                    <br />
                    打造视觉内容新体验
                </p>
                <button className={style.Enquirenow}>获取演示</button>
                <div className={style.videos}>
                    <video
                        controls
                        src="https://cdn.dancf.com/fe-assets/20231208/f5dc8aa920f2dfde27a2c6b9d1a09651.mp4"></video>
                </div>
            </div>
            {/* 缓动动画 */}
            <div className={style.EasingAnimation}>
                <p className={style.title}>
                    一站式服务
                    <br />
                    搭建企业视觉内容新基建
                </p>
                <EasingAnimation></EasingAnimation>
            </div>
            {/* 轮播图 */}
            <div className={style.Carousel}>
                <p className={style.title}>
                    与众多优秀品牌
                    <br />
                    共创营销数字化转型新实践
                </p>
                <Carousel></Carousel>
            </div>
            {/* 文字图片轮播 */}
            <div className={style.textcarousel}>
                <Textcarousel></Textcarousel>
            </div>
            {/* 跑马灯 */}
            <div className={style.Marquee}>
                <p className={style.title}>
                    众多企业携手稿定共建内容力
                </p>
                <Marquee></Marquee>
            </div>
        </div>
    )
}

export default Index
